﻿using Microsoft.AspNetCore.Mvc;
using ScadaAPI.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ScadaAPI.Controllers
{
    [ApiController]
    [Route("api/opctime")]
    public class TestController : ControllerBase
    {
        private readonly IOpcTestService _opcTestService;

        public TestController(IOpcTestService opcTestService)
        {
            _opcTestService = opcTestService;
        }


        //[HttpGet]
        //public IActionResult GetCount()
        //{
        //    int a = _opcTestService.GetCurrentCount();
        //    return Ok(a);
        //}


        [HttpGet]
        public IActionResult GetTime()
        {
            var a = _opcTestService.GetCurrentTime();
            return Ok(a);
        }

        //[HttpGet]
        //public IActionResult Welcome()
        //{
        //    return Ok("Welcome");
        //}


    }
}
